import {reqGetSearchList} from '@/api/index'
const state={
    searchList:[]
}
const actions={
   async getSearchList({commit},val){
       let result = await reqGetSearchList(val);
       if(result.code == 200){
           commit('GETSEARCHLIST',result.data)
       }
   }
}
const mutations={
    GETSEARCHLIST(state,searchList){
            state.searchList = searchList
    }
}
const getters={
    goodsList(state){
        return state.searchList.goodsList
    },
    trademarkList(state){
        return state.searchList.trademarkList
    },
    attrsList(state){
        return state.searchList.attrsList;
    }
}
export default {
    state,
    actions,
    mutations,
    getters
}